<?php

// +----------------------------------------------------------------------
// | ThinkAdmin
// +----------------------------------------------------------------------

use think\facade\Request;
use think\facade\Route;

/* 禁止操作路由绑定 */
if (stripos(Request::host(true), 'test.com') !== false) {
    Route::post('admin/user/pass', function () {
        return json(['code' => 0, 'info' => '禁止修改用户密码！']);
    });
    Route::post('admin/index/pass', function () {
        return json(['code' => 0, 'info' => '禁止修改用户密码！']);
    });
    Route::post('admin/user/remove', function () {
        return json(['code' => 0, 'info' => '禁止删除用户！']);
    });
    Route::rule('admin/user/forbid', function () {
        return json(['code' => 0, 'info' => '禁止操作用户！']);
    });
    Route::post('admin/user/edit', function () {
        return json(['code' => 0, 'info' => '禁止编辑用户！']);
    });

    Route::post('admin/config/file', function () {
        return json(['code' => 0, 'info' => '禁止修改系统配置！']);
    });
    Route::post('admin/config/config', function () {
        return json(['code' => 0, 'info' => '禁止修改系统配置！']);
    });
    Route::post('admin/menu/index', function () {
        return json(['code' => 0, 'info' => '禁止给菜单排序！']);
    });
    Route::post('admin/menu/add', function () {
        return json(['code' => 0, 'info' => '禁止添加菜单！']);
    });
    Route::post('admin/menu/edit', function () {
        return json(['code' => 0, 'info' => '禁止编辑菜单！']);
    });
    Route::post('admin/menu/forbid', function () {
        return json(['code' => 0, 'info' => '禁止禁用菜单！']);
    });
    Route::post('admin/menu/resume', function () {
        return json(['code' => 0, 'info' => '禁止恢复菜单！']);
    });

    Route::post('admin/menu/remove', function () {
        return json(['code' => 0, 'info' => '禁止删除菜单！']);
    });
    Route::post('wechat/config/options', function () {
        return json(['code' => 0, 'info' => '禁止修改微信配置！']);
    });
    Route::post('service/config/edit', function () {
        return json(['code' => 0, 'info' => '禁止修改开放配置！']);
    });
    Route::post('admin/database/optimize', function () {
        return json(['code' => 0, 'info' => '禁止优化数据库']);
    });
    Route::get('admin/database/optimize', function () {
        return json(['code' => 0, 'info' => '禁止优化数据库']);
    });
    Route::post('admin/database/repair', function () {
        return json(['code' => 0, 'info' => '禁止修复数据库']);
    });
    Route::get('admin/database/repair', function () {
        return json(['code' => 0, 'info' => '禁止修复数据库']);
    });
    Route::post('admin/database/del', function () {
        return json(['code' => 0, 'info' => '禁止删除数据库']);
    });
    Route::get('admin/database/del', function () {
        return json(['code' => 0, 'info' => '禁止删除']);
    });
    Route::get('admin/database/index', function () {
        return json(['code' => 0, 'info' => '禁止访问']);
    });

    Route::get('admin/index/buildoptimize', function () {
        return json(['code' => 0, 'info' => '禁止压缩发布访问']);
    });

    Route::post('admin/index/info', function () {
        return json(['code' => 0, 'info' => '禁止修改管理员信息']);
    });

    Route::post('admin/auth/forbid', function () {
        return json(['code' => 0, 'info' => '禁止操作']);
    });

    Route::post('admin/auth/remove', function () {
        return json(['code' => 0, 'info' => '禁止操作']);
    });

    Route::post('admin/auth/apply', function () {
        return json(['code' => 0, 'info' => '禁止操作']);
    });


    Route::post('admin/auth/add', function () {
        return json(['code' => 0, 'info' => '禁止操作']);
    });


    Route::post('admin/auth/edit', function () {
        return json(['code' => 0, 'info' => '禁止操作']);
    });

    Route::get('admin/queue/index', function () {
        return json(['code' => 0, 'info' => '禁止访问进程操作']);
    });
    Route::get('admin/oplog/index', function () {
        return json(['code' => 0, 'info' => '禁止访问进程操作']);
    });









}
